import i18n from '@/utils/i18n'
export const formItems = [
    {
        filed: 'memberName',
        type: 'input',
        label: i18n.t('message.name')
    },
    {
        filed: 'time',
        type: 'daterange',
        clearable: false,
        label: i18n.t('message.xzsjd'),
        pickerOptions: {
            shortcuts: [{
                text: i18n.t('message.jin7'),
                onClick (picker) {
                    const end = new Date()
                    const start = new Date()
                    end.setTime(end.getTime())
                    start.setTime(start.getTime() - 3600 * 1000 * 24 * 6)
                    picker.$emit('pick', [start, end])
                }
            },
            {
                text: i18n.t('message.jin30'),
                onClick (picker) {
                    const end = new Date()
                    const start = new Date()
                    end.setTime(end.getTime())
                    start.setTime(start.getTime() - 3600 * 1000 * 24 * 29)
                    picker.$emit('pick', [start, end])
                }
            },
            {
                text: i18n.t('message.jin60'),
                onClick (picker) {
                    const end = new Date()
                    const start = new Date()
                    end.setTime(end.getTime())
                    start.setTime(start.getTime() - 3600 * 1000 * 24 * 59)
                    picker.$emit('pick', [start, end])
                }
            },
            {
                text: i18n.t('message.jin90'),
                onClick (picker) {
                    const end = new Date()
                    const start = new Date()
                    end.setTime(end.getTime())
                    start.setTime(start.getTime() - 3600 * 1000 * 24 * 89)
                    picker.$emit('pick', [start, end])
                }
            }],
            disabledDate (time) {
                var curDate = new Date(new Date().toLocaleDateString()).getTime()
                var preDate = new Date(curDate)
                return time.getTime() > preDate
            }
        }
    },
    {
        filed: 'cardNumber',
        type: 'input',
        label: i18n.t('message.cardnum')
    },
    {
        filed: 'phoneNumber',
        type: 'input',
        label: i18n.t('message.sjh')
    },
    {
        filed: 'code',
        type: 'select',
        label: i18n.t('message.jylx'),
        options: [
            { value: '1', label: i18n.t('message.kk') },
            { value: '2', label: i18n.t('message.chouzhi') },
            { value: '3', label: i18n.t('message.xf') },
            { value: '4', label: i18n.t('message.tf') },
            { value: '5', label: i18n.t('message.tx') },
            { value: '6', label: i18n.t('message.yetz') }]
    }
]
export const queryFormConfig = {
    formItems,
    online: true
}
